feat: remove internal processors + contracts#920
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR renames the RippleContract::Internal enum variant to RippleContract::RippleContext to better reflect its purpose as an internal platform context for message passing between Main and Extensions. The change includes updating the documentation and moving the #[default] attribute to maintain the correct default value.
- Renamed
RippleContract::InternaltoRippleContract::RippleContextwith improved documentation - Updated all references throughout the codebase including production code, tests, and mock utilities
- Moved the
#[default]attribute to the new variant to preserve default behavior
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| core/sdk/src/framework/ripple_contract.rs | Renamed enum variant from Internal to RippleContext and updated documentation |
| core/sdk/src/utils/mock_utils.rs | Updated mock utilities to use RippleContext |
| core/sdk/src/extn/extn_client_message.rs | Updated ExtnPayloadProvider implementations and test assertions |
| core/sdk/src/extn/client/wait_for_service_processor.rs | Updated test messages to use RippleContext |
| core/sdk/src/extn/client/extn_processor.rs | Updated test state and assertions to use RippleContext |
| core/sdk/src/extn/client/extn_client.rs | Updated all test cases and processor initializations to use RippleContext |
| core/main/src/service/ripple_service/service_controller_state.rs | Updated error message handling to use RippleContext |
| core/main/src/firebolt/firebolt_ws.rs | Updated error message handling to use RippleContext |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| payload: ExtnPayload::Response(ExtnResponse::Error(e)), | ||
| requestor: ExtnId::try_from(session.get_app_id()).unwrap(), | ||
| target: RippleContract::Internal, | ||
| target: RippleContract::RippleContext, |
There was a problem hiding this comment.
We should not be sending any ExtnMessage here. Instead use service message for propagating this error as JSON RPC error response.
| id: "test_id".to_string(), | ||
| requestor: ExtnId::get_main_target("main".into()), | ||
| target: RippleContract::Internal, | ||
| target: RippleContract::RippleContext, |
There was a problem hiding this comment.
The scope of this ticket is to eliminate the use of RippleContract::Internal and switch to direct function calls or rule-based invocation. These tests are no longer relevant since we are removing the use of ExtnMessages.
Minimum allowed line rate is |
What
What does this PR add or remove?
Why
Why are these changes needed?
How
How do these changes achieve the goal?
Test
How has this been tested? How can a reviewer test it?
Checklist